﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using RHFrameWork;

namespace ResumeHelper
{
    public class WebSiteProcessInfos:DataObject
    {

        public WebSiteProcessInfo GetInfo(string Key)
        {
            WebSiteProcessInfo wspi = new WebSiteProcessInfo();
            wspi.Host = Key;

            string str = this.Item[Key];
            int idx = 0;
            string[] ary = str.Split(',','，');

            if (ary.Length > idx)
            {
                wspi.Url = ary[idx].Trim();
            }
            else
            {
                wspi.Url = "";
            }
            idx++;

            if (ary.Length > idx)
            {
                wspi.DisplayName = ary[idx].Trim();
            }
            else
            {
                wspi.DisplayName = "";
            }
            idx++;

            if (ary.Length > idx)
            {
                wspi.SiteType = ary[idx].Trim();
            }
            else
            {
                wspi.SiteType = "";
            }


            return wspi;
        }
        
        public class WebSiteProcessInfo
        {
            public string Host { get; set; }
            public string Url { get; set; }
            public string DisplayName { get; set; }
            public string SiteType { get; set; }
        }
       
    }
}
